<template>
  <div class="suspiciousOrderDetail">
    <zyInfoPanel title="人员信息" :showUnfoldButton="false" class="suspiciousOrderItem">
      <zy-button slot="title" @click="back">返回</zy-button>
      <div class="personalInfo">
        <div class="personalInfoItem">
          <div class="infoItem">寄件人：{{detail.post_communicate_name}}</div>
          <div class="infoItem">寄件人联系方式：{{detail.post_communicate_mobile}}</div>
          <div class="infoItem">寄件地址：{{detail.post_communicate_address}}</div>
        </div>
        <div class="arrow">
          <img src="@/assets/arrow.png" alt="">
        </div>
        <div class="personalInfoItem">
          <div class="infoItem">揽件人：{{detail.employee_name}}</div>
          <div class="infoItem">揽件人联系方式：{{detail.employee_mobile}}</div>
          <div class="infoItem">揽件时间：{{detail.post_time}}</div>
        </div>
        <div class="arrow">
          <img src="@/assets/arrow.png" alt="">
        </div>
        <div class="personalInfoItem">
          <div class="infoItem">收件人：{{detail.receive_communicate_name}}</div>
          <div class="infoItem">揽件人联系方式：{{detail.receive_communicate_mobile}}</div>
          <div class="infoItem">收件地址：{{detail.receive_communicate_address}}</div>
        </div>
      </div>
    </zyInfoPanel>
    <zyInfoPanel title="寄件详情" :showUnfoldButton="false" class="suspiciousOrderItem">
      <div class="postInfo">
        <div class="postInfoItem">
          <div class="itemTitle">寄件编号：</div>
          <div class="itemContent">{{detail.logistics_no}}</div>
        </div>
        <div class="postInfoItem">
          <div class="itemTitle">寄件单号：</div>
          <div class="itemContent">{{detail.logistics_no}}</div>
        </div>
        <div class="postInfoItem">
          <div class="itemTitle">企业名称：</div>
          <div class="itemContent">
            <div>{{detail.company_name}}</div>
            <zy-button text-button>点击查看详情</zy-button>
          </div>
        </div>
        <div class="postInfoItem">
          <div class="itemTitle">寄件客户类型：</div>
          <div class="itemContent">{{detail.logistics_no}}</div>
        </div>
        <div class="postInfoItem">
          <div class="itemTitle">揽件照片：</div>
          <div class="itemContent">
            <zy-image v-model="detail.img" class="img" readonly></zy-image>
          </div>
        </div>
      </div>
    </zyInfoPanel>
    <zyInfoPanel title="监管详情" :showUnfoldButton="false" class="suspiciousOrderItem" :titleFlex="false">
      <div slot="title" class="dubious">
        <div class="text">是否可疑件</div>
        <div class="tags" :class="{'tags-danger': detail.is_dubious == 1}">{{detail.is_dubious == 1?'可疑件':'正常件'}}</div>
        <zy-button :type="detail.is_dubious == 1?'primary':'danger'" @click="dubiousClick">{{detail.is_dubious == 1?'标记为正常件':'标记为可疑件'}}</zy-button>
      </div>
      <tablePanel tableName="SSuspiciousOrderDetailTable" :tableLoading="loading" :tableList="tableList"
                  :tableData="tableData" :total="total" :currentPage="page_start" :pageSize="page_size" :isShowDrop="false"
                  @sizeChange="sizeChange" @pageChange="pageChange">
      </tablePanel>
    </zyInfoPanel>
  </div>
</template>

<script>
	export default {
		name: "SSuspiciousOrderDetail",
		props: {},
		data() {
			return {
        detail: {},
				loading: false,
				tableList: [
					{
						title: '操作员',
						width: 120,
						name: 'employee_name',
						isShow: true,
						isSelected: true
					},
					{
						title: '操作角色',
						width: 120,
						name: 'sex',
						isShow: true,
						isSelected: true
					},
					{
						title: '操作时间',
						width: 120,
						name: 'employee_mobile',
						isShow: true,
						isSelected: true
					},
					{
						title: '描述',
						width: 120,
						name: 'employee_mobile',
						isShow: true,
						isSelected: true
					},
				],
				tableData: [],
				total: 0,
					page_start: 1,
					page_size: 10
      };
		},
		computed: {},
		watch: {},
		components: {},
		methods: {
			getData(){
				this.$axios.post(this.$api.detailLogistics, {
					logistics_id: this.logistics_id
        }).then(res => {
					let {code, msg, data} = res;
					this.loading = false;
					if (code == 200) {
						this.detail = {...data, img: data.employee_pictures[0]};
					} else {
						this.$message.error(msg);
					}
				}).catch(ret => {
					this.$message.error(ret.msg || '服务繁忙，请稍后再试');
				});
			},
			dubiousClick(){

      },
      back(){
				this.$blackRoute({path:'/sorting/suspicious_order',that: this})
      },
			sizeChange(val) {
				this.page_size = val;
				this.getData()
			},
			pageChange(val) {
				this.page_start = val;
				this.getData()
			},
    },
		mounted() {
			this.type = this.$route.query.type;
			this.logistics_id = this.$route.query.logistics_id;
			this.getData()
		},
		created() {
		}
	}
</script>

<style scoped lang="less" src="@/style/sorting/suspiciousOrder/suspiciousOrderDetail/index.less">

</style>
